<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <th:block th:include="common :: headerCss"></th:block>
</head>
<body>
<form class="demoTable layui-form" lay-filter="example">
    <div class="layui-form-item">
        <div class="layui-input-inline">
            <input class="layui-input" name="userName" id="userName" autocomplete="off" placeholder="用户名">
        </div>
        <div class="layui-input-inline">
            <select name="userStatus" id="status">
                <option value="-1">请选择用户状态</option>
                <option th:each="state : ${states.entrySet()}" th:value="${state.getKey()}" th:text="${state.getValue()}"></option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select name="deptId" id="dept">
                <option value="-1">请选择部门</option>
                <option th:each="dept : ${depts}" th:value="${dept.getId()}" th:text="${dept.getDeptName()}"></option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select name="posId" id="pos">
                <option value="-1">请选择岗位</option>
                <option th:each="pos : ${poss}" th:value="${pos.getId()}" th:text="${pos.getPosName()}"></option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select name="roleId" id="role">
                <option value="-1">请选择角色</option>
                <option th:each="role : ${roles}" th:value="${role.getId()}" th:text="${role.getRoleName()}"></option>
            </select>
        </div>
        <button class="layui-btn" lay-submit="" lay-filter="searchBtn"><i class="layui-icon layui-icon-search"></i>搜索</button>
    </div>
</form>
<table class="layui-hide" id="tableId" lay-filter="tableBar"></table>
<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-1"></i>添加</button>
    </div>
</script>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
<!--    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>-->
</script>

<script type="text/html" id="checkboxTpl">
    <input type="checkbox" name="lock" value="{{d.id}}" title="有效" lay-filter="lockDemo" {{ d.userStatus == 0 ? 'checked' : '' }}>
</script>

<!--引入添加或者修改界面-->
<div th:replace="user/addAndEdit :: addAndEditDiv"></div>

</body>
<div th:include="common :: footJs"></div>
<script th:src="@{/static/js/user/list.js}" th:inline="none"></script>

</html>